package com.ruiysoft.entity.mdse;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * <p>
 * 商品分类表
 * </p>
 *
 * @author liyahui
 * @since 2018-11-18
 */
@TableName("merchandise_category")
public class MerchandiseCategory extends Model<MerchandiseCategory> {

    private static final long serialVersionUID = 1L;

    /**
     * 分类id
     */
    @TableId(value = "category_id", type = IdType.AUTO)
    private Long categoryId;

    /**
     * 商铺id
     */
    @TableField("shop_id")
    private Long shopId;

    /**
     * 分类名称
     */
    @TableField("category_name")
    private String categoryName;

    /**
     * 分类小图标
     */
    private String icon;

    /**
     * 分类级别
     */
    @TableField("category_level")
    private String categoryLevel;

    /**
     * 分类的父id
     */
    @TableField("parent_id")
    private Long parentId;

    /**
     * 位置
     */
    private Integer position;

    @TableField("del_flag")
    private Integer delFlag;

    public Long getCategoryId() {
        return categoryId;
    }

    public MerchandiseCategory setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
        return this;
    }
    public Long getShopId() {
        return shopId;
    }

    public MerchandiseCategory setShopId(Long shopId) {
        this.shopId = shopId;
        return this;
    }
    public String getCategoryName() {
        return categoryName;
    }

    public MerchandiseCategory setCategoryName(String categoryName) {
        this.categoryName = categoryName;
        return this;
    }
    public String getIcon() {
        return icon;
    }

    public MerchandiseCategory setIcon(String icon) {
        this.icon = icon;
        return this;
    }
    public String getCategoryLevel() {
        return categoryLevel;
    }

    public MerchandiseCategory setCategoryLevel(String categoryLevel) {
        this.categoryLevel = categoryLevel;
        return this;
    }
    public Long getParentId() {
        return parentId;
    }

    public MerchandiseCategory setParentId(Long parentId) {
        this.parentId = parentId;
        return this;
    }
    public Integer getPosition() {
        return position;
    }

    public MerchandiseCategory setPosition(Integer position) {
        this.position = position;
        return this;
    }
    public Integer getDelFlag() {
        return delFlag;
    }

    public MerchandiseCategory setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.categoryId;
    }

    @Override
    public String toString() {
        return "MerchandiseCategory{" +
        "categoryId=" + categoryId +
        ", shopId=" + shopId +
        ", categoryName=" + categoryName +
        ", icon=" + icon +
        ", categoryLevel=" + categoryLevel +
        ", parentId=" + parentId +
        ", position=" + position +
        ", delFlag=" + delFlag +
        "}";
    }
}
